﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using EstateMan.DataAccess;
using EstateMan.Domain;

namespace EstateMan.Controllers.Api
{
    public class PropertyController : ApiController
    {
        private readonly EstateManContext _db = new EstateManContext();

        // GET api/property
        public IEnumerable<Property> Get()
        {
            return _db.Properties;
        }

        // GET api/property/5
        public Property Get(int id)
        {
            var property = _db.Properties.Find(id);
            return property;
        }

        // POST api/property
        public void Post([FromBody]string value)
        {
        }

        // PUT api/property/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/property/5
        public void Delete(int id)
        {
        }
    }
}
